Kanzi 3.9.10
kanzi::ParallelActivityHost3D Class Reference

An Activity Host that can display multiple Activity nodes at a time. More...

#include <kanzi/ui/node/parallel_activity_host3d.hpp>

Inheritance diagram for kanzi::ParallelActivityHost3D:
[legend]

Public Types

using ConceptClass
 Parallel Activity Host 3D concept used to implement this class.
 
- Public Types inherited from kanzi::ParallelActivityHostImpl< ContentLayout3D, ParallelActivityHost3D >
using NodeTypeSharedPtr
 
- Public Types inherited from kanzi::ActivityHostConcept
enum class  ActivationStatus { PreparingForActivation , ParallelAnimation , ExclusiveAnimation }
 Specifies possible stages for internal tracking of activation of an Activity. More...
 
using ActivityInfoContainer
 
enum class  DeactivationStatus { ExclusiveAnimation , ParallelAnimation , WaitingForRelease }
 Specifies possible stages for internal tracking of deactivation of an Activity. More...
 
- Public Types inherited from kanzi::ParallelActivityHostConcept
using ParallelActivityHostContent
 Container for the content information for a ParallelActivityHost.
 
enum class  ParallelActivityHostFocusingPolicy { WhenHostHasFocus , AlwaysFocus , NeverFocus }
 Specifies the focusing policy that Kanzi applies to an activating Activity in a Parallel Activity Host. More...
 

Static Public Member Functions

static ParallelActivityHost3DSharedPtr create (Domain *domain, string_view name)
 Creates a 3D Parallel Activity Host node.
 
static PropertyTypeEditorInfoSharedPtr makeEditorInfo ()
 
- Static Public Member Functions inherited from kanzi::ParallelActivityHostImpl< ContentLayout3D, ParallelActivityHost3D >
static PropertyTypeEditorInfoSharedPtr makeEditorInfo ()
 
- Static Public Member Functions inherited from kanzi::ActivityElement
static string getFirstElement (string_view activationSequence)
 Gets the first element of the activation sequence.
 
static string getRestToForward (string_view activationSequence)
 Gets the remainder of the activation sequence.
 
template<typename Type >
static bool isActivityElement (const Type &object)
 Returns whether an object is an ActivityElement.
 
static PropertyTypeEditorInfoSharedPtr makeEditorInfo ()
 
- Static Public Member Functions inherited from kanzi::ActivityHostConcept
template<typename Type >
static bool isActivityHost (const Type &object)
 Determines if an object is an ActivityHost.
 
static bool isActivityHostMetaclass (const Metaclass *metaclass)
 Checks whether the given Metaclass is an ActivityHostConcept metaclass or contains it as a mixin metaclass.
 
static PropertyTypeEditorInfoSharedPtr makeEditorInfo ()
 
- Static Public Member Functions inherited from kanzi::ParallelActivityHostConcept
static PropertyTypeEditorInfoSharedPtr makeEditorInfo ()
 Returns the PropertyType editor information for a Parallel Activity Host Concept.
 

Protected Member Functions

 ParallelActivityHost3D (Domain *domain, string_view name)
 Constructor.
 
- Protected Member Functions inherited from kanzi::ParallelActivityHostImpl< ContentLayout3D, ParallelActivityHost3D >
vector< string > getActivatingNames () override
 ActivityHostConcept::getActivatingNames implementation.
 
vector< NodeWeakPtrgetActiveOrAttachedActivating () override
 ActivityHostConceptImpl::getActiveOrAttachedActivating implementation.
 
optional< ActivityHostConcept::ActivityInfogetActivityInfo (string_view name) const override
 ActivityHostConceptImpl::getActivityInfo implementation.
 
vector< NodeWeakPtrgetAttachedActivityNodes () override
 ActivityHostConceptImpl::getAttachedActivityNodes implementation.
 
void initialize ()
 Initializes this parallel activity host.
 
void onActivateActivityOverride (string_view activationPath, bool resetHistory) override
 ActivityHostConcept::onActivateActivityOverride implementation.
 
void onAttached () override
 Node::onAttached implementation.
 
void onDetached () override
 Node::onDetached implementation.
 
void onNodePropertyChanged (AbstractPropertyType propertyType, PropertyNotificationReason reason) override
 Node::onNodePropertyChanged implementation.
 
 ParallelActivityHostImpl (Domain *domain, string_view name)
 Constructor.
 
void resolveFocusWithPolicy (Node &activityNode) override
 ActivityHostConceptImpl::resolveFocusWithPolicy implementation.
 
- Protected Member Functions inherited from kanzi::ActivityHostConceptImpl< TBaseClass, TDerivedClass >
 ActivityHostConceptImpl (Domain *domain, string_view name)
 Constructor.
 
void clearCurrentActivationTarget () const
 Clears current activation target.
 
void initialize ()
 Initializes this Activity Host Concept.
 
void registerInParentActivityElement () final
 ActivityElement::registerInParentActivityElement implementation.
 
void resolveFocusOnActivated (Node &activityNode)
 Performs the necessary operations to fix the application focus when an Activity has activated in this Activity Host.
 
void unregisterInParentActivityElement () final
 ActivityElement::unregisterInParentActivityElement implementation.
 
virtual ~ActivityHostConceptImpl ()=default
 Destructor.
 
- Protected Member Functions inherited from kanzi::ActivityElementImpl< TBaseClass, TDerivedClass >
 ActivityElementImpl (Domain *domain, string_view name)
 Constructor.
 
void initialize ()
 Initializes the activity element.
 
void onAttached () override
 Node::onAttached implementation.
 
virtual void onAttachedOverride ()
 Overrides the onAttached method.
 
void onDetached () override
 Node::onDetached implementation.
 
void onNodePropertyChanged (AbstractPropertyType propertyType, PropertyNotificationReason reason) override
 Node::onNodePropertyChanged implementation.
 
 ~ActivityElementImpl () override=default
 Destructor.
 
- Protected Member Functions inherited from kanzi::ActivityElement
optional< ActivityBrowserController::ActivityIDgetActivityID () const
 Gets the unique ID that is used by the implementation of the Activity Browser.
 
string getPathInParent ()
 Gets the activation path of this activity element relative to its parent.
 
void initialize ()
 Initializes the activity element.
 
bool isRootActivityElement () const
 Returns whether an ActivityElement is the root Activity Host node of the Screen node.
 
void onForceTrigger (const ActivityBrowserController::ForceTriggerMessageArguments &args)
 Message handler for ActivityBrowserController::ForceTriggerMessage.
 
void onNodeInfoTreeAvailable (const ActivityBrowserController::NodeInfoTreeAvailableArguments &)
 Message handler for ActivityBrowserController::NodeInfoTreeAvailableMessage.
 
void registerChildHost (string_view hostPath)
 Registers a child host in this activity element.
 
void setActivityID (optional< ActivityBrowserController::ActivityID > activityID)
 Sets the unique ID that is used by the implementation of the Activity Browser.
 
void unregisterChildHost (string_view hostName)
 Unregisters a child host from this activity element.
 
void updateActivityBrowserProperties ()
 Triggers the Activity Browser to update the properties of the Activity Element.
 

Additional Inherited Members

- Public Member Functions inherited from kanzi::ParallelActivityHostImpl< ContentLayout3D, ParallelActivityHost3D >
void activate (const ActivityHostConcept::ActivityInfo &activityInfo, string_view restOfActivationPath)
 Activates a child Activity node.
 
void deactivate (string_view name)
 Deactivates a child Activity node.
 
void deserialize (string_view data) override
 ActivityElement::deserialize implementation.
 
void onFinishedExclusiveDeactivatingAnimationInternal (const ActivityConcept::StatusChangedInternalMessageArguments &args)
 Message handler for FinishedExclusiveDeactivatingAnimationInternal message.
 
void onFinishedParallelActivatingAnimationInternal (const ActivityConcept::StatusChangedInternalMessageArguments &args)
 Message handler for FinishedParallelActivatingAnimationInternal message.
 
void onFinishedParallelDeactivatingAnimationInternal (const ActivityConcept::StatusChangedInternalMessageArguments &args)
 Message handler for FinishedParallelDeactivatingAnimationInternal message.
 
void setActivationModifier (string_view activityName, BindingTokenWeakPtr weakModifier) override
 ActivityHostConcept::setActivationModifier implementation.
 
- Public Member Functions inherited from kanzi::ActivityHostConceptImpl< TBaseClass, TDerivedClass >
void notifyChildrenNodeTreeAvailable () override
 ActivityElement::notifyChildrenNodeTreeAvailable implementation.
 
string serialize () override
 ActivityElement::serialize implementation.
 
- Public Member Functions inherited from kanzi::ActivityElementImpl< TBaseClass, TDerivedClass >
const NodegetNode () const override
 Gets the underlying Node object.
 
NodegetNode () override
 Gets the underlying Node object.
 
- Public Member Functions inherited from kanzi::ActivityElement
vector< NodeSharedPtr >::const_iterator beginChildHosts () const
 Returns the begin iterator to the registered child Activity Host.
 
vector< NodeSharedPtr >::const_iterator endChildHosts () const
 Returns the end iterator to the registered child Activity Host.
 
NodefindChildHost (string_view hostName)
 Finds a child Activity Host by name.
 
vector< string > getCommands () const
 Gets the list of commands handled by code behind of this activity element.
 
ActivityHistoryManagergetHistoryManager () const
 Gets the history manager of this activity element.
 
ActivityElementgetParentElement ()
 Gets the parent ActivityElement type node.
 
bool isLeafActivityNode () const
 Returns whether an ActivityElement has a child Activity Host.
 
void setCodeBehind (CodeBehindSharedPtr codeBehind)
 Attaches a code behind object.
 
void setCodeBehind (const Metaclass *metaclass)
 Instantiates and attaches a code behind object by specifying its metaclass.
 
virtual ~ActivityElement ()=default
 Destructor.
 
- Public Member Functions inherited from kanzi::ActivityHostConcept
virtual ~ActivityHostConcept ()=default
 Destructor.
 
- Public Member Functions inherited from kanzi::ParallelActivityHostConcept
virtual ~ParallelActivityHostConcept ()=default
 Destructor.
 
- Static Public Attributes inherited from kanzi::ActivityElement
static PropertyType< boolAttachedProperty
 
static PropertyType< boolPreserveHistoryProperty
 Enables the preservation of Activity property values when that Activity becomes inactive.
 
- Static Public Attributes inherited from kanzi::ActivityHostConcept
static MessageType< ActivationMessageArgumentsActivateActivityMessage
 You can send ActivateActivity to the Activity Host to activate an Activity.
 
static MessageType< ActivationMessageArgumentsDeactivateActivityMessage
 You can send DeactivateActivity to the Activity Host to deactivate an Activity.
 
static MessageType< ActivityPrefabMessageArgumentsActivityPrefabAttachedMessage
 An Activity Host sends this message when it attaches the prefab of the Activity that is activated.
 
static MessageType< ActivityPrefabMessageArgumentsActivityPrefabDetachedMessage
 An Activity Host sends this message when it attaches the prefab of the Activity that is activated.
 
static MessageType< RegisterActivityElementInternalMessageArgumentsRegisterHostInternalMessage
 Internal message sent by an Activity Host to its parent Activity or Activity Host to register the Activity Host in the parent.
 
static MessageType< UnregisterActivityElementInternalMessageArgumentsUnregisterHostInternalMessage
 Internal message sent by an Activity Host to its parent Activity or Activity Host to unregister the Activity Host from the parent.
 
- Static Public Attributes inherited from kanzi::ParallelActivityHostConcept
static PropertyType< boolBringActivatedToFrontProperty
 Sets whether to show the activated Activity in front within its Parallel Activity Host.
 
static PropertyType< boolActivationStackProperty
 Sets whether a Parallel Activity Host keeps a child Activity node active to satisfy the request from both ActivateActivityMessage activation and ApplyActivationAction mechanism.
 
static PropertyType< string > ParallelActivityHostContentProperty
 Describes the content of a Parallel Activity Host node.
 
static PropertyType< ParallelActivityHostFocusingPolicyFocusOnActivationProperty
 Sets the focusing policy that Kanzi uses to decide whether it tries to set focus to an activating Activity in a Parallel Activity Host.
 
- Protected Attributes inherited from kanzi::ActivityHostConceptImpl< TBaseClass, TDerivedClass >
string m_activationTarget
 The name of the Activity that is the candidate to be the activation target.
 
bool m_deserializing
 Indicates that this Activity Host is performing property deserialization.
 
bool m_hostHadFocus
 Indicates that the Activity Host had focus before it started to activate new activation target Activity.
 

Detailed Description

An Activity Host that can display multiple Activity nodes at a time.

An Activity Host node defines the rules for when its Activity nodes are active. Kanzi has these Activity Host nodes:

  • Parallel Activity Host node can activate more than one of its child Activity nodes at a time.
  • Data-Driven Exclusive Activity Host and Exclusive Activity Host nodes can have only one of its child Activity nodes active at a time. When one child Activity node of a Data-Driven Exclusive Activity Host or an Exclusive Activity Host node is active, all other Activity nodes of that Activity Host node are inactive.

    For example, you can use a Data-Driven Exclusive Activity Host or an Exclusive Activity Host node to toggle between views in your application.

    See DataDrivenExclusiveActivityHost2D, DataDrivenExclusiveActivityHost3D, ExclusiveActivityHost2D, and ExclusiveActivityHost3D.

Parallel Activity Host can show multiple activities at the same time. When you activate an Activity node, a Parallel Activity Host node brings that Activity to the front. In a Parallel Activity Host node you can group Activity nodes, to show the groups in the same order that you defined in the node tree. When you activate an Activity node in a group, a Parallel Activity Host node brings to the front the Activity in that group. For example, this way you can implement the showing of critical messages, such as engine failure, in front of regular notifications, such as a phone call notification. In both groups a Parallel Activity Host node shows the Activity nodes in order of activation.

You can add Activity nodes to an Activity Host node in real-time. This enables you to use the Kanzi Engine API to generate Activity nodes or to add to the application another application for which the structure of Activity nodes is not known until you run the application. For example, you can use the API to generate a large number of popup windows that you want to show to the user.

The Activity and Activity Host nodes inherit from the ContentLayout class to lay out their content like a Content Layout node. See ContentLayout2D and ContentLayout3D.

See Activity2D and Activity3D.

Controlling Activity nodes in a Parallel Activity Host node

The type of the Activity Host node determines the way you control its child Activity nodes. When you use a Parallel Activity Host node, you can control its Activity nodes in these ways:

Data and logic programming of Activity nodes

For each Parallel Activity Host node you can define properties that are specific to that Parallel Activity Host node.

When you create a property for a Parallel Activity Host node, set the namespace of that property to Activity Property. You can create properties with int, bool, float, and enum data types. If you use code behind for a Parallel Activity Host, Kanzi adds the properties of that Parallel Activity Host to the code behind.

The values of these properties implement the state machine and logic of your Kanzi application, which is why Kanzi preserves the values of these properties even when a Parallel Activity Host is virtual. When Kanzi virtualizes a Parallel Activity Host, it serializes the properties of that Parallel Activity Host and when Kanzi devirtualizes that Parallel Activity Host, it deserializes the state of that Parallel Activity Host and restores its property values.

Code behind

Code behind is a workflow where you associate code with an instance of a Parallel Activity Host instead of a type. In Kanzi Studio in the Activity Browser window, you can generate a code behind stub for any Parallel Activity Host node. This stub is associated with that particular Parallel Activity Host and has access to the properties of that Parallel Activity Host. In code behind you can write code that you can associate with the view or controller parts of the model-view-controller pattern. For example, you can:

  • Connect to a remote service when the Parallel Activity Host is instantiated and attached.
  • Install Kanzi command handlers and define their implementations, such as increase the volume when the user presses a button.
  • Implement complex UI interaction, such as drag-and-drop of data between UI elements.

Member Typedef Documentation

◆ ConceptClass

Parallel Activity Host 3D concept used to implement this class.

Constructor & Destructor Documentation

◆ ParallelActivityHost3D()

kanzi::ParallelActivityHost3D::ParallelActivityHost3D ( Domain * domain,
string_view name )
explicitprotected

Constructor.

Parameters
domainThe domain the new node belongs to.
nameThe name of the node.

Member Function Documentation

◆ create()

static ParallelActivityHost3DSharedPtr kanzi::ParallelActivityHost3D::create ( Domain * domain,
string_view name )
static

Creates a 3D Parallel Activity Host node.

Parameters
domainThe domain the new node belongs to.
nameThe name of the node.

◆ makeEditorInfo()

static PropertyTypeEditorInfoSharedPtr kanzi::ParallelActivityHost3D::makeEditorInfo ( )
static

The documentation for this class was generated from the following file: